Developer Documentation
PATH  WebObjects 4.5 Documentation > Getting Started With Direct to Java Client

   

Enumeration Entities

Direct to Java Client also defines the concept of an enumerationentity. An enumeration entity is an entity that conforms to the conditions for main entities and additionally conforms to the following conditions:

In practice, enumeration entities should define a collection of values that represent a list of choices. For example, in this tutorial application, the enumeration entities are FeeTypes and RentalTerms.

The values in enumeration entities are usually fairly static, and you usually don't want a complex user interface for changing them. Consequently, Direct to Java Client applications provide a single window for editing enumeration values.

  1. Open the Enumeration Window.

    Choose the "Enumeration Window" command in the Tools menu. This opens the Enumeration Window, which contains a tab for each of the application's enumeration entities. The tab for a particular entity shows the complete set of values in that entity (which should be a small number of values). You can add a new value to the enumeration's collection (Add), delete a value from the collection (Remove), and modify a value (simply make the changes and click Save).

By displaying enumeration values in this special window, an application doesn't clutter the Query Window with tabs for enumeration entities. This approach simplifies the application's user interface in other ways, as well. The application doesn't provide form windows for enumeration entities, and relationships to enumeration entities can be represented simply with combo boxes (for to-one relationships) and pick lists (for to-many relationships) instead of with a tables (to-ones) and select dialogs (to-manys).


© 1999 Apple Computer, Inc. – (Draft. Last updated 05 Jan 00)